package com.omuao.message.queue.core.rocketmq;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * 消息通道配置
 *
 * @author omuao
 */
public interface MessageChannelProcessor {

    /**
     * 延迟输入通道
     */
    String DELAY_INPUT = "system_topic_queue_delay_input";

    /**
     * 延迟输出通道
     */
    String DELAY_OUTPUT = "system_topic_queue_delay_output";

    /**
     * 实时输出通道
     */
    String REALTIME_OUTPUT = "system_topic_queue_realtime_output";


    /**
     * 延迟输入通道
     *
     * @return
     */
    @Input(MessageChannelProcessor.DELAY_INPUT)
    SubscribableChannel input();

    /**
     * 延迟输出通道
     *
     * @return
     */
    @Output(MessageChannelProcessor.DELAY_OUTPUT)
    MessageChannel output();

    /**
     * 实时输出通道
     *
     * @return
     */
    @Output(MessageChannelProcessor.REALTIME_OUTPUT)
    MessageChannel realtimeOutput();

}